package com.engineering.elink.videodao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.engineering.elink.co.BaseCo;
import com.engineering.elink.co.EvaluateCo;
import com.engineering.elink.domain.Evaluate;
import com.engineering.elink.vo.EvaluateVo;

public interface EvaluateMapper {
    int deleteByPrimaryKey(Integer evaluateId);

    int insert(Evaluate record);

    int insertSelective(Evaluate record);

    Evaluate selectByPrimaryKey(Integer evaluateId);

    int updateByPrimaryKeySelective(Evaluate record);

    int updateByPrimaryKey(Evaluate record);

    int selectCountEvaluate(@Param("courseId") Integer courseId,@Param("userId") String userId,@Param("type") Integer type);
    
	List<EvaluateVo> selectTopEvaluatesByCourseId(@Param("co") EvaluateCo co,@Param("type") Integer type);
	
	int selectTopEvaluatesCount(@Param("co") EvaluateCo co,@Param("type") Integer type);
	
	List<EvaluateVo> selectAllEvaluatesByTopId(@Param("co") BaseCo co,@Param("topId")Integer topId,@Param("type") Integer type,@Param("parentFlag") Boolean parentFlag);

	int selectCount(@Param("topId") int topId,@Param("type") Integer type,@Param("parentFlag") Boolean parentFlag);

	int selectTopByRootId(Integer rootId);
	
	List<Evaluate> selectAllEvaluateByRootId(Integer rootId);
}